<template>
    <h1>Parent 组件</h1>
    <Child />
    <p>{{ msg }}</p>
</template>

<script>
import Child from "./Child.vue"

export default {
    components: {
        Child
    },
    // 接收来自 main.js 提供的全局数据
    inject: ['msg']
}
</script>

<style></style>